package cn.charlab.boot.obs.config;


import cn.charlab.boot.obs.ObsTemplate;
import cn.charlab.boot.obs.properties.ObsProperties;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;


@AutoConfiguration
@EnableConfigurationProperties(value = ObsProperties.class)
public class ObsConfigAutoConfiguration {

    @Bean(destroyMethod = "destroy")
    public ObsTemplate obsTemplate(ObsProperties obsProperties){
        return new ObsTemplate(obsProperties);
    }
}
